/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.purpose.mapper;

import com.koron.purpose.bean.SafetyActivityLedgerBean;
import com.koron.purpose.bean.SafetyActivityPersonBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SafetyActivityMapper {
    /**
     * 根据条件 查询活动台账列表
     * @param map
     * @return
     */
    List<Map> querySafActivityLeds(Map map);

    /**
     * 统计 根据条件 查询活动台账列表 个数
     * @param map
     * @return
     */
    Integer countSafActivityLeds(Map map);

    /**
     * 根据ID查询安全活动台账
     * @param id
     * @return
     */
    SafetyActivityLedgerBean queryById(String id);

    /**
     * 新增 安全活动台账表
     * @param bean
     * @return
     */
    Integer insertSafetyActLedger(SafetyActivityLedgerBean bean);

    /**
     * 新增 安全活动人员表
     * @param personBeans
     */
    void insertSafetyActPerson(@Param("personBeans") List<SafetyActivityPersonBean> personBeans);

    /**
     * 根据id 删除 安全活动台账
     * @param id
     * @return
     */
    Integer deleteSafetyActivityLedger(String id);

    /**
     * 根据 安全活动台账id 删除 安全活动人员
     * @param safetyActivityLedgerId 安全活动台账id
     * @return
     */
    Integer deleteSafetyActivityPerson(String safetyActivityLedgerId);

    /**
     * 根据 安全活动台账id 查询 安全活动人员
     * @param safetyActivityLedgerId
     * @return
     */
    List<Map> queryPersonBySALId(String safetyActivityLedgerId);

    /**
     * 修改 安全活动台账表
     * @param bean
     * @return
     */
    Integer updateSafetyActLedger(SafetyActivityLedgerBean bean);

    }
